#include <bits/stdc++.h>
using namespace std;

#define int long long

int n, cnt, p;

signed main()
{
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    int t;
    cin >> t;
    while (t--) {
        cin >> n;
        cnt = 0;
        for (int i = 1; i <= n; i++)
            cin >> p, cnt ^= p;
        if (cnt == 0)
            cout << "No" << endl;
        else
            cout << "Yes" << endl;
    }
    return 0;
}